(0) Obligation:
The Runtime Complexity (innermost) of the given
CpxTRS could be proven to be
BOUNDS(1, n^1).
The TRS R consists of the following rules:
active(eq(0, 0)) → mark(true)
active(eq(s(X), s(Y))) → mark(eq(X, Y))
active(eq(X, Y)) → mark(false)
active(inf(X)) → mark(cons(X, inf(s(X))))
active(take(0, X)) → mark(nil)
active(take(s(X), cons(Y, L))) → mark(cons(Y, take(X, L)))
active(length(nil)) → mark(0)
active(length(cons(X, L))) → mark(s(length(L)))
active(inf(X)) → inf(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
active(length(X)) → length(active(X))
inf(mark(X)) → mark(inf(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
length(mark(X)) → mark(length(X))
proper(eq(X1, X2)) → eq(proper(X1), proper(X2))
proper(0) → ok(0)
proper(true) → ok(true)
proper(s(X)) → s(proper(X))
proper(false) → ok(false)
proper(inf(X)) → inf(proper(X))
proper(cons(any(X1), X2)) → cons(any(any(proper(X1))), any(proper(X2)))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(length(X)) → length(proper(X))
eq(ok(X1), ok(X2)) → ok(eq(X1, X2))
s(ok(X)) → ok(s(X))
inf(ok(X)) → ok(inf(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
length(ok(X)) → ok(length(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))
any(X) → s(X)
any(proper(X)) → any(any(any(X)))
Rewrite Strategy: INNERMOST
(1) NestedDefinedSymbolProof (BOTH BOUNDS(ID, ID) transformation)
The following defined symbols can occur below the 0th argument of top: proper, active
The following defined symbols can occur below the 0th argument of proper: proper, active
The following defined symbols can occur below the 0th argument of active: proper, active
Hence, the left-hand sides of the following rules are not basic-reachable and can be removed:
active(eq(0, 0)) → mark(true)
active(eq(s(X), s(Y))) → mark(eq(X, Y))
active(eq(X, Y)) → mark(false)
active(inf(X)) → mark(cons(X, inf(s(X))))
active(take(0, X)) → mark(nil)
active(take(s(X), cons(Y, L))) → mark(cons(Y, take(X, L)))
active(length(nil)) → mark(0)
active(length(cons(X, L))) → mark(s(length(L)))
active(inf(X)) → inf(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
active(length(X)) → length(active(X))
proper(eq(X1, X2)) → eq(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(inf(X)) → inf(proper(X))
proper(cons(any(X1), X2)) → cons(any(any(proper(X1))), any(proper(X2)))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(length(X)) → length(proper(X))
any(proper(X)) → any(any(any(X)))
(2) Obligation:
The Runtime Complexity (innermost) of the given
CpxTRS could be proven to be
BOUNDS(1, n^1).
The TRS R consists of the following rules:
proper(true) → ok(true)
top(ok(X)) → top(active(X))
proper(nil) → ok(nil)
take(X1, mark(X2)) → mark(take(X1, X2))
take(mark(X1), X2) → mark(take(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
any(X) → s(X)
inf(mark(X)) → mark(inf(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
s(ok(X)) → ok(s(X))
proper(false) → ok(false)
length(mark(X)) → mark(length(X))
proper(0) → ok(0)
eq(ok(X1), ok(X2)) → ok(eq(X1, X2))
inf(ok(X)) → ok(inf(X))
length(ok(X)) → ok(length(X))
top(mark(X)) → top(proper(X))
Rewrite Strategy: INNERMOST
(3) CpxTrsMatchBoundsTAProof (EQUIVALENT transformation)
A linear upper bound on the runtime complexity of the TRS R could be shown with a Match-Bound[TAB_LEFTLINEAR,TAB_NONLEFTLINEAR] (for contructor-based start-terms) of 2.
The compatible tree automaton used to show the Match-Boundedness (for constructor-based start-terms) is represented by:
final states : [1, 2, 3, 4, 5, 6, 7, 8, 9]
transitions:
true0() → 0
ok0(0) → 0
active0(0) → 0
nil0() → 0
mark0(0) → 0
false0() → 0
00() → 0
proper0(0) → 1
top0(0) → 2
take0(0, 0) → 3
cons0(0, 0) → 4
any0(0) → 5
inf0(0) → 6
s0(0) → 7
length0(0) → 8
eq0(0, 0) → 9
true1() → 10
ok1(10) → 1
active1(0) → 11
top1(11) → 2
nil1() → 12
ok1(12) → 1
take1(0, 0) → 13
mark1(13) → 3
cons1(0, 0) → 14
ok1(14) → 4
s1(0) → 5
inf1(0) → 15
mark1(15) → 6
take1(0, 0) → 16
ok1(16) → 3
s1(0) → 17
ok1(17) → 7
false1() → 18
ok1(18) → 1
length1(0) → 19
mark1(19) → 8
01() → 20
ok1(20) → 1
eq1(0, 0) → 21
ok1(21) → 9
inf1(0) → 22
ok1(22) → 6
length1(0) → 23
ok1(23) → 8
proper1(0) → 24
top1(24) → 2
ok1(10) → 24
ok1(12) → 24
mark1(13) → 13
mark1(13) → 16
ok1(14) → 14
mark1(15) → 15
mark1(15) → 22
ok1(16) → 13
ok1(16) → 16
ok1(17) → 5
ok1(17) → 17
ok1(18) → 24
mark1(19) → 19
mark1(19) → 23
ok1(20) → 24
ok1(21) → 21
ok1(22) → 15
ok1(22) → 22
ok1(23) → 19
ok1(23) → 23
active2(10) → 25
top2(25) → 2
active2(12) → 25
active2(18) → 25
active2(20) → 25
(4) BOUNDS(1, n^1)